package org.platform.controller.knowledge;

import com.mc.mic.core.bo.CmdBO;
import com.mc.mic.core.bus.provider.BaseServiceRegister;
import org.platform.mo.csmo.cmd10022.KnowApplyRequestParam;
import org.platform.mo.csmo.cmd10022.KnowApplyResponseParam;
import org.platform.mo.csmo.cmd10023.KnowAuditRequestParam;
import org.platform.mo.csmo.cmd10023.KnowAuditResponseParam;
import org.platform.mo.csmo.cmd10024.KnowPublishRequestParam;
import org.platform.mo.csmo.cmd10024.KnowPublishResponseParam;
import org.platform.mo.csmo.cmd10025.KnowledgeQueryRequestParam;
import org.platform.mo.csmo.cmd10025.KnowledgeQueryResponseParam;
import org.springframework.web.bind.annotation.PostMapping;
import org.springframework.web.bind.annotation.RequestBody;
import org.springframework.web.bind.annotation.RestController;

/**
 * @author FengJie
 * @date 2018/4/16
 */
@RestController
public class KnowledgeRegister extends BaseServiceRegister {
    /**
     * 知识申请（10022）
     *
     * @param cmdBO
     * @return
     */
    @PostMapping(value = "10022")
    public CmdBO knowApply(@RequestBody CmdBO<KnowApplyRequestParam, KnowApplyResponseParam> cmdBO) {
        return super.serviceExecutor(cmdBO);
    }

    /**
     * 知识审核（10023）
     *
     * @param cmdBO
     * @return
     */
    @PostMapping(value = "10023")
    public CmdBO knowAudit(@RequestBody CmdBO<KnowAuditRequestParam, KnowAuditResponseParam> cmdBO) {
        return super.serviceExecutor(cmdBO);
    }

    /**
     * 知识发布（10024）
     *
     * @param cmdBO
     * @return
     */
    @PostMapping(value = "10024")
    public CmdBO knowPublish(@RequestBody CmdBO<KnowPublishRequestParam, KnowPublishResponseParam> cmdBO) {
        return super.serviceExecutor(cmdBO);
    }

    /**
     * 查询所有的知识
     */
    @PostMapping(value = "10025")
    public CmdBO queryKnowledge(@RequestBody CmdBO<KnowledgeQueryRequestParam, KnowledgeQueryResponseParam> cmdBO) {
        return super.serviceExecutor(cmdBO);
    }


}
